import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes: [
        {
            path: '/',
            name: 'login',
            meta: '登录',
            component: () => import('@/views/Login.vue')
        },
        {
            path: '/home',
            name: '',
            component: () => import('@/views/Home.vue'),
            children: [
                {
                    path: '',
                    meta: '',
                    component: () => import('@/views/pages/index_page.vue')
                },
                {
                    path: '/rishTrendList',
                    name: 'rishTrendList',
                    meta: '⻛险预测',
                    component: () => import('@/views/pages/rishTrendView/rish_trend_page.vue')
                },
                {
                    path: '/riskHistoryTrendList',
                    name: 'riskHistoryTrendList',
                    meta: '历史趋势',
                    component: () => import('@/views/pages/riskHistoryTrendView/risk_history_trend_list_page.vue')
                },
                {
                    path: '/rishTrendReportList',
                    name: 'rishTrendReportList',
                    meta: '导出风险趋势',
                    component: () => import('@/views/pages/rishTrendReportView/rish_trend_report_page.vue')
                },
                {
                    path: '/originalDataList',
                    name: 'originalDataList',
                    meta: '基础数据维护',
                    component: () => import('@/views/pages/originalDataView/original_data_list_page.vue')
                },
                {
                    path: '/riskReasonList',
                    name: 'riskReasonList',
                    meta: '⻛险原因',
                    component: () => import('@/views/pages/riskReasonView/risk_reason_list_page.vue')
                },
                {
                    path: '/smsLogList',
                    name: 'smsLogList',
                    meta: '预警日志',
                    component: () => import('@/views/pages/smsLogView/sms_log_list_page.vue')
                },

                {
                    path: '/riskPositionList',
                    name: 'riskPositionList',
                    meta: '风险点设置',
                    component: () => import('@/views/pages/riskPositionView/risk_position_list_page.vue')
                } ,
                {
                    path: '/detectorList',
                    name: 'detectorList',
                    meta: '设备管理',
                    component: () => import('@/views/pages/detectorView/detector_list_page.vue')
                } ,
                {
                    path: '/managerList',
                    name: 'managerList',
                    meta: '管理员',
                    component: () => import('@/views/pages/managerView/manager_list_page.vue')
                }
            ]
        },
        {
            path: '*',
            redirect: '/'
        }
    ]
})

